package com.hingstd.lastwork.services;

import com.hingstd.lastwork.dao.ArticleRepository;
import com.hingstd.lastwork.entities.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleService {

    @Autowired
    ArticleRepository articleRepository;

    public Article save(Article article) {
        return articleRepository.save(article);
    }
    public List<Article> getAll(){
        return articleRepository.findAll();
    }
}
